package com.dragon.modules.yuegou.model.merchant;

import com.dragon.modules.yuegou.entity.merchant.MerchantShortUrlEntity;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * 商户短码表模型类
 * 
 * @author pbuilder generated
 * @date 2019-09-29 10:10:16
 * @company sgy
 * @version 2.0
 * @see Length 长度限制
 * @see NotNull 对象非空
 * @see NotEmpty 字符串、集合、表、数组非空
 */
public class MerchantShortUrl extends MerchantShortUrlEntity {

	/**
	 * 构造一个空商户短码表模型对象
	 */
	public MerchantShortUrl(){
		super();
	}
	
	/**
	 * 依据实体对象的信息构造一个商户短码表模型对象
	 * 
	 * @param entity 实体对象
	 */
	public MerchantShortUrl(MerchantShortUrlEntity entity){
		super(entity);
	}

	/**
	 * 依据其它对象的信息构造一个商户短码表模型对象
	 * 
	 * @param other 其它对象
	 */
	public MerchantShortUrl(MerchantShortUrl other){
		super(other);
	}


	@Override
	public String getId() {
    	return id;
    }

    /**
	 * 设置
	 * 
	 * @param id 
	 * @return 当前对象
	 */
    public MerchantShortUrl id(String id) {
    	this.id = id;
    	return this;
    }

	@Override
	public String getMerchantId() {
    	return merchantId;
    }

    /**
	 * 设置商户ID
	 * 
	 * @param merchantId 商户ID
	 * @return 当前对象
	 */
    public MerchantShortUrl merchantId(String merchantId) {
    	this.merchantId = merchantId;
    	return this;
    }

	@Override
	public String getShortCode() {
    	return shortCode;
    }

    /**
	 * 设置短链接码
	 * 
	 * @param shortCode 短链接码
	 * @return 当前对象
	 */
    public MerchantShortUrl shortCode(String shortCode) {
    	this.shortCode = shortCode;
    	return this;
    }

	@Override
	public String getShortUrl() {
    	return shortUrl;
    }

    /**
	 * 设置短链接
	 * 
	 * @param shortUrl 短链接
	 * @return 当前对象
	 */
    public MerchantShortUrl shortUrl(String shortUrl) {
    	this.shortUrl = shortUrl;
    	return this;
    }

	@Override
	public LocalDateTime getCreateTime() {
    	return createTime;
    }

    /**
	 * 设置
	 * 
	 * @param createTime 
	 * @return 当前对象
	 */
    public MerchantShortUrl createTime(LocalDateTime createTime) {
    	this.createTime = createTime;
    	return this;
    }
}
